﻿@model IEnumerable<PhotoBlogApp.Core.Request>
<div class="block">
    <p>
        @Html.ActionLink("Создать", "Create")
    </p>
    <table class="table">
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.Date)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.LastName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.FirstName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Comment)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.ContactInfo)
            </th>
            <th></th>
        </tr>

        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.Date)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.LastName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.FirstName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Comment)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.ContactInfo)
                </td>
                <td>
                    @Html.ActionLink("Edit", "Edit", new { id = item.RequestId }) |
                    @Html.ActionLink("Delete", "Delete", new { id = item.RequestId })
                </td>
            </tr>
        }

    </table>
    @Html.ActionLink("На главную", "Index", "Root")
</div>
